/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Randall Chia
 */
@Entity
public class RewardVoucher implements Serializable{
    private static long serialVersionUID = 1L;

    /**
     * @return the serialVersionUID
     */
    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    /**
     * @param aSerialVersionUID the serialVersionUID to set
     */
    public static void setSerialVersionUID(long aSerialVersionUID) {
        serialVersionUID = aSerialVersionUID;
    }
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    
    
   
    
    // =================================================================================================================== 
    private Long reward_id;
    private long customer_id;
    private String stakeholder;
    private String reward_Name;
//    @Column(columnDefinition = "LONGTEXT")
    private String reward_Description;
    private Integer reward_Cost;
    @Temporal(TemporalType.TIMESTAMP)
    private Date purchaseDate;
    
    private boolean redeemed;
    @Temporal(TemporalType.TIMESTAMP)
    private Date redemptionDate;
    // =================================================================================================================== 
    
    public RewardVoucher(){}
    
    public RewardVoucher(    
             Long reward_id,
             long customer_id,
             String stakeholder,
             String reward_Name,
             String reward_Description,
             Integer reward_Cost,
             Date purchaseDate
            ){
        this.reward_id = reward_id;
        this.customer_id = customer_id;
        this.stakeholder = stakeholder;
        this.reward_Name = reward_Name;
        this.reward_Description = reward_Description;
        this.reward_Cost = reward_Cost;
        this.purchaseDate = purchaseDate;
        
        this.redeemed = false;
    }
    
    
    /**
     * @return the id
     */
    public Long getReward_id() {
        return reward_id;
    }

    /**
     * @param id the id to set
     */
    public void setReward_id(Long reward_id) {
        this.reward_id = reward_id;
    }

    /**
     * @return the stakeholder
     */
    public String getStakeholder() {
        return stakeholder;
    }

    /**
     * @param stakeholder the stakeholder to set
     */
    public void setStakeholder(String stakeholder) {
        this.stakeholder = stakeholder;
    }

    /**
     * @return the reward_Name
     */
    public String getReward_Name() {
        return reward_Name;
    }

    /**
     * @param reward_Name the reward_Name to set
     */
    public void setReward_Name(String reward_Name) {
        this.reward_Name = reward_Name;
    }

    /**
     * @return the reward_Description
     */
    public String getReward_Description() {
        return reward_Description;
    }

    /**
     * @param reward_Description the reward_Description to set
     */
    public void setReward_Description(String reward_Description) {
        this.reward_Description = reward_Description;
    }

    /**
     * @return the reward_Cost
     */
    public Integer getReward_Cost() {
        return reward_Cost;
    }

    /**
     * @param reward_Cost the reward_Cost to set
     */
    public void setReward_Cost(Integer reward_Cost) {
        this.reward_Cost = reward_Cost;
    }

    /**
     * @return the purchaseDate
     */
    public Date getPurchaseDate() {
        return purchaseDate;
    }

    /**
     * @param purchaseDate the purchaseDate to set
     */
    public void setPurchaseDate(Date purchaseDate) {
        this.purchaseDate = purchaseDate;
    }

    /**
     * @return the redeemed
     */
    public boolean isRedeemed() {
        return redeemed;
    }

    /**
     * @param redeemed the redeemed to set
     */
    public void setRedeemed(boolean redeemed) {
        this.redeemed = redeemed;
    }

    /**
     * @return the redemptionDate
     */
    public Date getRedemptionDate() {
        return redemptionDate;
    }

    /**
     * @param redemptionDate the redemptionDate to set
     */
    public void setRedemptionDate(Date redemptionDate) {
        this.redemptionDate = redemptionDate;
    }

    /**
     * @return the customer_id
     */
    public long getCustomer_id() {
        return customer_id;
    }

    /**
     * @param customer_id the customer_id to set
     */
    public void setCustomer_id(long customer_id) {
        this.customer_id = customer_id;
    }
    
    
    
    
}
